<?php

require_once("model/data.php");

class Home {
	
	// actions
	function index() {
		global $data;
		$data = new Data();
		$data->content = "homeView.php";
		
		$data->menu['Home']="index.php?controller=home&action=index";
		$data->menu['A propos']="index.php?controller=home&action=aPropos";
		$data->menu['Voir photos']="index.php?controller=viewPhoto&action=index";
		$data->menu['Upload de photos']="index.php?controller=uploadPhoto&action=index";
		$data->menu['Gestion des albums']="index.php?controller=gestionAlbums&action=index";
		require_once("view/mainView.php");
	}
	
	function aPropos() {
		global $data;
		$data = new Data();
		$data->content = "aProposView.php";
		
		$data->menu['Home']="index.php?controller=home&action=index";
		$data->menu['A propos']="index.php?controller=home&action=aPropos";
		$data->menu['Voir photos']="index.php?controller=viewPhoto&action=index";
		$data->menu['Upload de photos']="index.php?controller=uploadPhoto&action=index";
		$data->menu['Gestion des albums']="index.php?controller=gestionAlbums&action=index";
		require_once("view/mainView.php");
	}
	
	function nonRealise() {
		trigger_error("Fonctionalite non realise");
	}
}
?>
